export default [
  {
    path: '/user',
    layout: false,
    routes: [
      { path: '/user/login', component: './User/Login' },
      { path: '/user/register', component: './User/Register' },
    ],
  },
  { path: '/index', icon: 'home', component: './Index', name: '主页' },
  {
    path: '/analyze/:id',
    icon: 'home',
    component: './Analyze',
    name: '空间分析页面',
    hideInMenu: true,
  },

  {
    icon: 'table',
    path: '/my/picture/',
    component: './My/Picture',
    name: '我的图片',
    hideInMenu: true,
  },
  {
    path: '/picture',
    icon: 'crown',
    name: '图片相关页',
    access: 'canUser',
    hideInMenu: true,
    routes: [
      { path: '/picture', redirect: '/index' },
      {
        icon: 'table',
        path: '/picture/detail/:id',
        component: './Picture/Detail',
        name: '图片详情页',
        hideInMenu: true,
      },
      {
        icon: 'table',
        path: '/picture/search/:id',
        component: './Picture/Search',
        name: '图片搜索结果页',
        hideInMenu: true,
      },
    ],
  },
  {
    path: '/my',
    icon: 'crown',
    name: '我的',
    access: 'canUser',
    hideInMenu: true,
    routes: [
      { path: '/my', redirect: '/my/picture' },
      { path: '/my/picture/', component: './My/Picture', name: '我的图片', hideInMenu: true },
      { path: '/my/space/', component: './My/Space', name: '我的空间', hideInMenu: true },
      { path: '/my/team/', component: './My/Team', name: '我的团队', hideInMenu: true },
      { path: '/my/team/:spaceId', component: './My/Team', name: '我的团队', hideInMenu: true },
    ],
  },
  {
    path: '/admin',
    icon: 'crown',
    name: '管理页',
    access: 'canAdmin',
    routes: [
      { path: '/admin', redirect: '/admin/user' },
      { path: '/admin/user', component: './Admin/User', name: '用户管理' },
      { path: '/admin/picture', component: './Admin/Picture', name: '图片管理' },
      { path: '/admin/space', component: './Admin/Space', name: '空间管理' },
    ],
  },
  { path: '/', redirect: '/index' },
  { path: '*', layout: false, component: './404' },
];
